OpenStack Juno : Configure Glance
2015/01/03 |
Install and Configure OpenStack Image Service (Glance).
|
|
[1] | Install Glance. |
[root@dlp ~]# yum -y install openstack-glance
|
[2] | Add a User and Database on MariaDB for Glance. |
[root@dlp ~]# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 19 Server version: 10.0.13-MariaDB-wsrep MariaDB Server, wsrep_25.10.r4123 Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
create database glance; Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on glance.* to glance@'localhost' identified by 'password'; Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on glance.* to glance@'%' identified by 'password'; Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
MariaDB [(none)]> flush privileges; Query OK, 0 rows affected (0.00 sec) exit Bye |
[3] | Configure Glance. |
[root@dlp ~]#
vi /etc/glance/glance-registry.conf # line 143: uncomment and change the info ( the one for MariaDB ) connection= mysql://glance:password@localhost/glance
# line 224: change like follows ( the one added in Keystone ) [keystone_authtoken] identity_uri=http:// 10.0.0.30:35357 admin_tenant_name= service admin_user= glance admin_password= servicepassword
# line 238: add
flavor=keystone
[root@dlp ~]#
vi /etc/glance/glance-api.conf # line 223: change ( RabbitMQ User and Password ) rabbit_userid= guest rabbit_password= password
# line 303: uncomment and change the info ( the one for MariaDB ) connection= mysql://glance:password@localhost/glance
# line 384: change like follows ( the one added in Keystone ) [keystone_authtoken] identity_uri=http:// 10.0.0.30:35357 admin_tenant_name= service admin_user= glance admin_password= servicepassword revocation_cache_time=10 # line 399: add
flavor=keystone
glance-manage db_sync [root@dlp ~]# for service in api registry; do systemctl start openstack-glance-$service systemctl enable openstack-glance-$service done |